package com.ss.android.lockscreen.component;

import android.app.ProgressDialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.CallSuper;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import com.ss.android.lockscreen.bb;
import java.util.List;

public abstract class a extends FragmentActivity {
    public ProgressDialog a;
    private List b;
    private boolean c;

    public a() {

    }

    static ProgressDialog a(a arg1) {
        return arg1.a;
    }

    static List a(a arg0, List arg1) {
        arg0.b = arg1;
        return arg1;
    }

    public abstract void a();

    public final void a(String arg4, boolean arg5) {
        int v0_1;
        String v2;
        Intent v1;
        try {
            v1 = new Intent();
            v1.setComponent(new ComponentName(arg4, "com.ss.android.lockscreen.component.TmpActivity"));
            v1.setFlags(65536);
            v2 = "setting_sync";
            if(arg5) {
                v0_1 = 1;
            } else {
                v0_1 = 0;
            }
            v1.putExtra(v2, v0_1);
            this.startActivityForResult(v1, 666);
        }
        catch(Exception v0) {
        }
    }

    private void b() {
        this.c = false;
        if(this.b == null || (this.b.isEmpty())) {
            this.c = true;
            if(this.a != null && (this.a.isShowing())) {
                this.a.dismiss();
            }

            bb.a();
            bb.c();
            this.a();
            bb.a();
            if(!bb.c()) {
                return;
            }

            bb.a();
            bb.b(((Context)this));
        }
    }

    static boolean b(a arg1) {
        return arg1.c;
    }

    static List c(a arg1) {
        return arg1.b;
    }

    static void d(a arg0) {
        arg0.b();
    }

    @CallSuper
    public void onActivityResult(int arg3, int arg4, Intent arg5) {
        super.onActivityResult(arg3, arg4, arg5);
        if(arg3 == 666 && arg4 == -1 && arg5 != null) {
            String v0 = arg5.getStringExtra("result");
            if(!TextUtils.isEmpty(((CharSequence)v0)) && this.b != null) {
                this.b.remove(v0);
            }

            this.b();
        }
    }

    @CallSuper
    public void onResume() {
        super.onResume();
        bb.a();
        bb.c();
        this.a();
    }
}

